//
//  SQLCenter.h
//  ASVN
//
//  Created by Cuongth on 9/30/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#define DBName @"AstroDB.sqlite"

@class Store, Category;
@interface DBCenter : NSObject {
	sqlite3 *database;
	sqlite3_stmt *deleteStmt;
	sqlite3_stmt *addStmt;
	sqlite3_stmt *detailStmt;
	sqlite3_stmt *updateStmt;
}

- (DBCenter*) init;

// Set and get Device Token
- (NSString*) getToken:(NSInteger)tokenType;
- (void) setToken:(NSString*)token WithTokenType:(NSInteger)tokenType; 


+ (void) copyDatabaseIfNeeded;
+ (NSString *) getDBPath;

// Return stores
//- (NSArray*) getStores;
//- (void) saveStore:(Store*)s; 
//- (void) clearAllStores;
//
//// Return categories
//- (NSArray*) getCategoriesWithStore:(NSString*)storeId;
//- (void) saveCategory:(Category*)c withStoreId:(NSString*)storeId;
//- (void) clearAllCategories;

@end
